import 'package:flutter/material.dart';
import 'package:flutter_study/day02.dart';
import 'package:flutter_study/day03.dart';
import 'package:flutter_study/home.dart';
import 'package:flutter_study/day01.dart';

import 'day04.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      initialRoute:"home_page", //名为"/"的路由作为应用的home(首页)
      routes: {
        "home_page":(context)=> MyHomePage(title: 'Flutter学习课程'), //注册首页路由
        "day_01":(context) => Day01(),
        "day_02":(context) => Day02(),
        "day_03":(context) => Day03(),
        "day_04":(context) => Day04(),
      },
    );
  }
}
